package biblioteca.service;

import biblioteca.persistencia.Socio;
import biblioteca.dao.SocioDao;
import java.util.Collection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.stereotype.Service;


@Service
public class SocioServiceImplementation implements SocioService {

    private SocioDao socioDao;

    @Autowired
    @Required
    public void setSocioDao(final SocioDao socioDao) {
        this.socioDao = socioDao;
    }

    @Override
    public void crear(Socio socio) {
       socioDao.insert(socio);
    }

    @Override
    public void borrar() {

    }

    @Override
    public int countAllsaludos() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public Collection<Socio> getAllsaludos() {
        return socioDao.getAll(Socio.class);
    }

}
